package donot996.icu.tieba.controller;

import donot996.icu.tieba.response.JsonResult;
import donot996.icu.tieba.service.IDetailListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/detail")
public class DetailListController {
    @Autowired
    IDetailListService detailListService;

    // 回复
    @PostMapping("/replay")
    public JsonResult replay(Long topicId, Long userId, String userName, String content){
        detailListService.replay(topicId, userId,userName,content);
        return JsonResult.success();
    }
}
